<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditEnderecoTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_idEndereco}" for="idEndereco" />
                    <h:inputText id="idEndereco" value="#{enderecoController.selected.idEndereco}" title="#{bundle.EditEnderecoTitle_idEndereco}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_idEndereco}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_logradouro}" for="logradouro" />
                    <h:inputText id="logradouro" value="#{enderecoController.selected.logradouro}" title="#{bundle.EditEnderecoTitle_logradouro}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_logradouro}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_numero}" for="numero" />
                    <h:inputText id="numero" value="#{enderecoController.selected.numero}" title="#{bundle.EditEnderecoTitle_numero}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_numero}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_bairro}" for="bairro" />
                    <h:inputText id="bairro" value="#{enderecoController.selected.bairro}" title="#{bundle.EditEnderecoTitle_bairro}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_bairro}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_cidade}" for="cidade" />
                    <h:inputText id="cidade" value="#{enderecoController.selected.cidade}" title="#{bundle.EditEnderecoTitle_cidade}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_cidade}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_uf}" for="uf" />
                    <h:inputText id="uf" value="#{enderecoController.selected.uf}" title="#{bundle.EditEnderecoTitle_uf}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_uf}"/>
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_cep}" for="cep" />
                    <h:inputText id="cep" value="#{enderecoController.selected.cep}" title="#{bundle.EditEnderecoTitle_cep}" />
                    <h:outputLabel value="#{bundle.EditEnderecoLabel_usuarioCli}" for="usuarioCli" />
                    <h:selectOneMenu id="usuarioCli" value="#{enderecoController.selected.usuarioCli}" title="#{bundle.EditEnderecoTitle_usuarioCli}" required="true" requiredMessage="#{bundle.EditEnderecoRequiredMessage_usuarioCli}">
                        <f:selectItems value="#{usuarioCliController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{enderecoController.update}" value="#{bundle.EditEnderecoSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditEnderecoViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{enderecoController.prepareList}" value="#{bundle.EditEnderecoShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditEnderecoIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
